﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WindowChromeBrowser
{
    /// <summary>
    /// Settings.xaml 的交互逻辑
    /// </summary>
    public partial class Settings : Window
    {
        public Settings()
        {
            InitializeComponent();
        }

        private void seting_Click(object sender, RoutedEventArgs e)
        {
            Configuration cfa = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
            uri.Text.Substring(0, 5);
            if(uri.Text!="" && (uri.Text.Contains("http://")|| uri.Text.Contains("https://")))
            {
                cfa.AppSettings.Settings["Html_Uri"].Value = uri.Text;
                cfa.Save();
                MessageBox.Show("设置成功！");
                this.Close();
            } 
        }
    }
}
